Skip to main content
Glama
route.ts641 B
import { createMcpHandler } from "@vercel/mcp-adapter"; import { z } from "zod"; const handler = createMcpHandler( (server) => { server.tool( "echo", "Echo a message", { message: z.string() }, async ({ message }) => ({ content: [{ type: "text", text: `Tool echo: ${message}` }], }) ); }, { capabilities: { tools: { echo: { description: "Echo a message", }, }, }, }, { redisUrl: process.env.REDIS_URL, basePath: "", verboseLogs: true, maxDuration: 60, } ); export { handler as GET, handler as POST, handler as DELETE };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samihalawa/next-js-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server